﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BestLifePOS_Core.Data.Commands;
using BestLifePOS_Core.DomainObjects;

namespace BestLifePOS_Core.Data.Fascade
{
   public class CategoryDAO
    {
       public static List<Category> GetAllCategories()
       {
           BestLifeGetAllCategoryDataAction LvGet = new BestLifeGetAllCategoryDataAction();
           return LvGet.execute();
       }

       public static List<Category> GetCategoriesById(string PCat)
       {
           BestLifeCategoryByIDDataAction LvGet = new BestLifeCategoryByIDDataAction(PCat);
           return LvGet.execute();
       }

       public static string GetNewCategory()
       {
           BestLifeGetNewCategoryDataAction LvGet = new BestLifeGetNewCategoryDataAction();
           return LvGet.execute();
       }

       public static int SaveCategory(Category PCat)
       {
           BestLifeInsertCategoryDataAction LvGet = new BestLifeInsertCategoryDataAction(PCat);
           return LvGet.execute();
       }
    }
}
